﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BanVeXemPhim_Presentation
{
    public class RapChieuControl
    {
        private RapChieuDAO _rapChieuDao;
        public RapChieuDAO RapChieuDao
        {
            get { return _rapChieuDao; }
            set { _rapChieuDao = value; }
        }
        public RapChieuControl()
        {
            _rapChieuDao=new RapChieuDAO();
        }
        public RapChieuDTO[] DanhSachRapChieu()
        {
            return _rapChieuDao.DanhSachRapChieu();
        }

        public void ThemRapChieu(ref RapChieuDTO rapchieuInfo)
        {
            //Thêm thông tin rạp chiếu.
            _rapChieuDao.ThemRapChieu(rapchieuInfo);
            rapchieuInfo.IdRapChieu=_rapChieuDao.LayIdRapChieu(rapchieuInfo);
            GheControl gheControl=new GheControl();
            gheControl.KhoiTaoDanhSachGheChoRap(rapchieuInfo);
        }

        public void CapNhatThongTinRapChieu(RapChieuDTO rapchieuInfo)
        {
            _rapChieuDao.CapNhatThongTinRapChieu(rapchieuInfo);
        }

    }
}
